/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package deatax.display.gui;

import deatax.Dice;
import java.awt.Dimension;

/**
 *
 * @author pson
 */
public class DicePanel extends ImagePanel {

    public DicePanel() {
        super(Dice.getTexture());
        this.width = 64;
        this.height = 64;
        
        this.setPreferredSize(new Dimension(width, height));
    }
    
    public void setRoll(int n) {
        switch (n) {
            case 1:
                x = 0;
                y = 0;
                break;
            case 2:
                x = 64;
                y = 0;
                break;
            case 3:
                x = 0;
                y = 64;
                break;
            case 4:
                x = 64;
                y = 64;
                break;
            case 5:
                x = 0;
                y = 128;
                break;
            case 6:
                x = 64;
                y = 128;
                break;
            default:
                x = 0;
                y = 0;
                break;
        }
    }
    
}
